package com.smart.business.order.controller;

import com.msart.api.dto.order.OrderDto;
import com.smart.business.order.service.BusinessOrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 全局分布式事务
 * 分布式锁
 */
@RestController
@RequestMapping("/order")
public class BusinessController {
    @Resource
    BusinessOrderService service;

    @GetMapping("/")
    public OrderDto order() {
        OrderDto order = service.createOrder(null);
        return order;
    }

}
